<div class="inner-content">
	
	<div class="breadcrumb">
		{foreach from="`$breadcrumb`" item="crumb"}<a href="#{$crumb.id}">{$crumb.title|escape:"html":"UTF-8"}</a> » {/foreach}
		{$page.revision.title|escape:"html":"UTF-8"}
	</div>
	
	{foreach from="`$template_vars`" item="var"}
	<div><p>
		<label for="{$var.name}">{$var.title|replace:'_':' '|escape:"html":"UTF-8"} <!--({$var.name})--></label>
		{if $var.type=='RichText'}
			<textarea name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var.name}" class="richtext">{$page.content[$var.name]|escape:"html":"UTF-8"}</textarea>
		{elseif $var.type=='Text'}
			<textarea name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var.name}">{$page.content[$var.name]|escape:"html":"UTF-8"}</textarea>
		{elseif $var.type=='Bool'}
			<input type="radio" name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var.name}_1" value="1" {if $page.content[$var.name]|escape:"html":"UTF-8"==1}checked="checked"{/if} /> Yes
			<input type="radio" name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var.name}_0" value="0" {if $page.content[$var.name]|escape:"html":"UTF-8"!=1}checked="checked"{/if} /> No
		{elseif $var.type=='Select'}
			<select name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var_name}">
				<option></option>
				{foreach from="`$var.options`" item="option"}
					<option {if $page.content[$var.name] == $option}selected="selected"{/if}>{$option|escape:"html":"UTF-8"}</option>
				{/foreach}
			</select>
		{elseif $var.type=='File'}
			<select name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var_name}">
				<option></option>
				{foreach from="`$file_list`" item="file"}{if $file.type=='file'}
					<option value="{$file.id}" {if $page.content[$var.name] == $file.id}selected="selected"{/if}>{$file.title|escape:"html":"UTF-8"}</option>
				{/if}{/foreach}
			</select>
		{elseif $var.type=='FileFolder'}
			<select name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var_name}">
				<option></option>
				{foreach from="`$file_list`" item="file"}{if $file.type=='folder'}
					<option value="{$file.id}" {if $page.content[$var.name] == $file.id}selected="selected"{/if}>{$file.title|escape:"html":"UTF-8"}</option>
				{/if}{/foreach}
			</select>
		{elseif $var.type=='Image'}
			<select name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var_name}" class="image" rel="{$var.config}">
				<option></option>
				{foreach from="`$image_list`" item="image"}{if $image.type=='image'}
					<option value="{$image.id}" {if $page.content[$var.name] == $image.id}selected="selected"{/if}>{$image.title|escape:"html":"UTF-8"}</option>
				{/if}{/foreach}
			</select>
			<div class="image-preview">
				{if $page.content[$var.name]}
					<img src="/images/{if $var.config}{$var.config}/{/if}{$page.content[$var.name]}/imagefilename" />
				{/if}
			</div>
		{elseif $var.type=='ImageFolder'}
			<select name="page[content][{$var.name|escape:"html":"UTF-8"}]" id="{$var_name}">
				<option></option>
				{foreach from="`$image_list`" item="image"}{if $image.type=='folder'}
					<option value="{$image.id}" {if $page.content[$var.name] == $image.id}selected="selected"{/if}>{$image.title|escape:"html":"UTF-8"}</option>
				{/if}{/foreach}
			</select>
		{else}
			<input type="text" name="page[content][{$var.name|escape:"html":"UTF-8"}]" value="{$page.content[$var.name]|escape:"html":"UTF-8"}" id="{$var.name}" />
		{/if}
	</p></div>
	{/foreach}
	
</div>